<!-- 装备总看台 -->
<template>
    <el-tabs 
        v-model="activeTab"
        type="border-card">
        <el-tab-pane label="基础信息" name="info">
          <EquuipInfo :equipment="equipmentData" :open-type="'edit'" :width="'600px'"/>
        </el-tab-pane>
        <el-tab-pane label="属性信息" name="attribute">
          <EquipAttribute :equipment="equipmentData" :open-type="'edit'" :width="'600px'"/>
        </el-tab-pane>
        <el-tab-pane label="锻造与强化" name="forge">
          <EquuipForge :equipment="equipmentData" :open-type="'edit'" :width="'600px'"/>
        </el-tab-pane>
        <el-tab-pane label="技能" name="skill">
          <EquuipSkill :equipment="equipmentData" :open-type="'edit'" :width="'600px'"/>
        </el-tab-pane>
        <el-tab-pane label="符文" name="rune">
          <EquuipRune :equipment="equipmentData" :open-type="'edit'" :width="'600px'"/>
        </el-tab-pane>
    </el-tabs>
</template>

<script setup lang="ts">
import { ref, watch } from 'vue';
import { ElTree } from 'element-plus';
import {ajax } from '@/api';
import { ElMessage } from 'element-plus';
import { number } from 'echarts';
import EquipAttribute from './equip-attribute.vue';
import EquuipInfo from './equuip-info.vue';
import EquuipForge from './equuip-forge.vue';
import EquuipSkill from './equuip-skill.vue';
import EquuipRune from './equuip-rune.vue';
import { EquipTpl, createEquipTpl } from '@/pojo/equip-tpl';
// 定义当前激活的标签页，默认为第一个
const activeTab = ref('info');
// 定义 props 接收 modelValue
// const props = defineProps<{
//   equipment?: EquipEntity; // 必须符合 Equipment 类型、
//   openType: string; // 打开方式 add/edit/preview
// }>();
const equipmentData = ref<EquipTpl>(createEquipTpl());


</script>

<style scoped></style>
